home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C source text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 68 6f 77 6c 61 6e 64 2e | 72 65 73 74 6f 6e 2e 61 |howland.|reston.a|
|00000030| 6e 73 2e 6e 65 74 21 70 | 73 69 6e 6e 74 70 21 70 |ns.net!p|sinntp!p|
|00000040| 73 69 6e 6e 74 70 21 70 | 73 69 6e 6e 74 70 21 70 |sinntp!p|sinntp!p|
|00000050| 73 69 6e 6e 74 70 21 62 | 62 6e 65 77 73 31 21 74 |sinntp!b|bnews1!t|
|00000060| 72 73 76 72 21 6e 65 77 | 73 0a 46 72 6f 6d 3a 20 |rsvr!new|s.From: |
|00000070| 42 65 6e 6a 61 6d 69 6e | 20 52 6f 6d 65 72 20 3c |Benjamin| Romer <|
|00000080| 62 6d 72 31 40 74 72 70 | 6f 34 2e 74 72 2e 75 6e |bmr1@trp|o4.tr.un|
|00000090| 69 73 79 73 2e 63 6f 6d | 3e 0a 53 75 62 6a 65 63 |isys.com|>.Subjec|
|000000a0| 74 3a 20 52 65 3a 20 67 | 65 74 73 28 29 20 69 6e |t: Re: g|ets() in|
|000000b0| 20 43 2b 2b 0a 53 65 6e | 64 65 72 3a 20 6e 65 77 | C++.Sen|der: new|
|000000c0| 73 40 74 72 2e 75 6e 69 | 73 79 73 2e 63 6f 6d 20 |s@tr.uni|sys.com |
|000000d0| 28 63 6e 65 77 73 20 6e | 65 77 73 20 69 64 2e 29 |(cnews n|ews id.)|
|000000e0| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 33 31 |.Message|-ID: <31|
|000000f0| 33 44 42 46 41 38 2e 37 | 36 34 45 40 74 72 70 6f |3DBFA8.7|64E@trpo|
|00000100| 34 2e 74 72 2e 75 6e 69 | 73 79 73 2e 63 6f 6d 3e |4.tr.uni|sys.com>|
|00000110| 0a 44 61 74 65 3a 20 57 | 65 64 2c 20 36 20 4d 61 |.Date: W|ed, 6 Ma|
|00000120| 72 20 31 39 39 36 20 31 | 36 3a 33 39 3a 30 34 20 |r 1996 1|6:39:04 |
|00000130| 47 4d 54 0a 54 6f 3a 20 | 62 72 69 61 6e 40 73 68 |GMT.To: |brian@sh|
|00000140| 72 73 79 73 2e 68 73 6c | 63 2e 6f 72 67 0a 58 2d |rsys.hsl|c.org.X-|
|00000150| 4e 6e 74 70 2d 50 6f 73 | 74 69 6e 67 2d 48 6f 73 |Nntp-Pos|ting-Hos|
|00000160| 74 3a 20 62 6d 72 31 2e | 74 72 2e 75 6e 69 73 79 |t: bmr1.|tr.unisy|
|00000170| 73 2e 63 6f 6d 0a 43 6f | 6e 74 65 6e 74 2d 54 72 |s.com.Co|ntent-Tr|
|00000180| 61 6e 73 66 65 72 2d 45 | 6e 63 6f 64 69 6e 67 3a |ansfer-E|ncoding:|
|00000190| 20 37 62 69 74 0a 43 6f | 6e 74 65 6e 74 2d 54 79 | 7bit.Co|ntent-Ty|
|000001a0| 70 65 3a 20 74 65 78 74 | 2f 70 6c 61 69 6e 3b 20 |pe: text|/plain; |
|000001b0| 63 68 61 72 73 65 74 3d | 75 73 2d 61 73 63 69 69 |charset=|us-ascii|
|000001c0| 0a 52 65 66 65 72 65 6e | 63 65 73 3a 20 3c 36 4d |.Referen|ces: <6M|
|000001d0| 41 52 39 36 2e 31 33 35 | 35 34 33 35 37 40 73 68 |AR96.135|54357@sh|
|000001e0| 72 73 79 73 2e 68 73 6c | 63 2e 6f 72 67 3e 0a 4d |rsys.hsl|c.org>.M|
|000001f0| 69 6d 65 2d 56 65 72 73 | 69 6f 6e 3a 20 31 2e 30 |ime-Vers|ion: 1.0|
|00000200| 0a 58 2d 4d 61 69 6c 65 | 72 3a 20 4d 6f 7a 69 6c |.X-Maile|r: Mozil|
|00000210| 6c 61 20 32 2e 30 20 28 | 57 69 6e 4e 54 3b 20 49 |la 2.0 (|WinNT; I|
|00000220| 29 0a 4f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 3a 20 |).Organi|zation: |
|00000230| 55 6e 69 73 79 73 20 43 | 6f 72 70 2e 0a 0a 62 72 |Unisys C|orp...br|
|00000240| 69 61 6e 40 73 68 72 73 | 79 73 2e 68 73 6c 63 2e |ian@shrs|ys.hslc.|
|00000250| 6f 72 67 20 77 72 6f 74 | 65 3a 0a 3e 20 0a 3e 20 |org wrot|e:.> .> |
|00000260| 49 6e 20 43 2c 20 67 65 | 74 73 28 73 74 72 69 6e |In C, ge|ts(strin|
|00000270| 67 29 20 77 69 6c 6c 20 | 72 65 61 64 20 61 20 73 |g) will |read a s|
|00000280| 74 72 69 6e 67 20 66 72 | 6f 6d 20 73 74 64 69 6e |tring fr|om stdin|
|00000290| 20 74 6f 20 74 68 65 20 | 6e 65 77 6c 69 6e 65 2c | to the |newline,|
|000002a0| 0a 3e 20 77 68 69 6c 65 | 20 73 63 61 6e 66 28 22 |.> while| scanf("|
|000002b0| 25 73 22 2c 20 73 74 72 | 69 6e 67 29 20 73 74 6f |%s", str|ing) sto|
|000002c0| 70 73 20 61 74 20 74 68 | 65 20 66 69 72 73 74 20 |ps at th|e first |
|000002d0| 77 68 69 74 65 73 70 61 | 63 65 20 63 68 61 72 61 |whitespa|ce chara|
|000002e0| 63 74 65 72 2e 0a 3e 20 | 0a 3e 20 49 6e 20 43 2b |cter..> |.> In C+|
|000002f0| 2b 2c 20 63 69 6e 20 3e | 3e 20 73 74 72 69 6e 67 |+, cin >|> string|
|00000300| 20 73 74 6f 70 73 20 61 | 74 20 74 68 65 20 66 69 | stops a|t the fi|
|00000310| 72 73 74 20 77 68 69 74 | 65 73 70 61 63 65 20 63 |rst whit|espace c|
|00000320| 68 61 72 61 63 74 65 72 | 2e 0a 3e 20 49 73 20 74 |haracter|..> Is t|
|00000330| 68 65 72 65 20 61 20 43 | 2b 2b 20 65 71 75 69 76 |here a C|++ equiv|
|00000340| 61 6c 65 6e 74 20 74 6f | 20 67 65 74 73 28 29 3f |alent to| gets()?|
|00000350| 0a 3e 20 0a 3e 20 53 74 | 75 61 72 74 20 42 72 69 |.> .> St|uart Bri|
|00000360| 61 6e 20 28 62 72 69 61 | 6e 40 73 68 72 73 79 73 |an (bria|n@shrsys|
|00000370| 2e 68 73 6c 63 2e 6f 72 | 67 29 0a 0a 79 6f 75 20 |.hslc.or|g)..you |
|00000380| 77 61 6e 74 20 74 6f 20 | 63 61 6c 6c 20 63 69 6e |want to |call cin|
|00000390| 2e 67 65 74 6c 69 6e 65 | 28 63 68 61 72 20 2a 62 |.getline|(char *b|
|000003a0| 75 66 2c 20 69 6e 74 20 | 73 7a 2c 20 63 68 61 72 |uf, int |sz, char|
|000003b0| 20 74 65 72 6d 20 3d 20 | 27 5c 6e 27 29 0a 77 68 | term = |'\n').wh|
|000003c0| 65 72 65 0a 62 75 66 20 | 3d 20 74 68 65 20 63 68 |ere.buf |= the ch|
|000003d0| 61 72 5b 5d 20 6f 66 20 | 79 6f 75 72 20 62 75 66 |ar[] of |your buf|
|000003e0| 66 65 72 0a 73 7a 20 3d | 20 74 68 65 20 6d 61 78 |fer.sz =| the max|
|000003f0| 69 6d 75 6d 20 6e 75 6d | 62 65 72 20 6f 66 20 63 |imum num|ber of c|
|00000400| 68 61 72 73 20 74 6f 20 | 67 65 74 0a 74 65 72 6d |hars to |get.term|
|00000410| 20 3d 20 74 65 72 6d 69 | 6e 61 74 69 6e 67 20 63 | = termi|nating c|
|00000420| 68 61 72 61 63 74 65 72 | 20 66 6f 72 20 74 68 65 |haracter| for the|
|00000430| 20 6c 69 6e 65 20 28 65 | 2e 67 2e 20 79 6f 75 20 | line (e|.g. you |
|00000440| 63 61 6e 20 65 6e 64 20 | 6f 6e 20 73 6f 6d 65 74 |can end |on somet|
|00000450| 68 69 6e 67 20 6f 74 68 | 65 72 0a 20 20 20 20 20 |hing oth|er. |
|00000460| 20 20 74 68 61 6e 20 27 | 5c 6e 27 2c 20 66 6f 72 | than '|\n', for|
|00000470| 20 65 78 61 6d 70 6c 65 | 20 27 5c 74 27 29 0a 0a | example| '\t')..|
|00000480| 65 78 2e 0a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ex..----|--------|
|00000490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004a0| 2d 0a 23 69 6e 63 6c 75 | 64 65 20 3c 69 6f 73 74 |-.#inclu|de <iost|
|000004b0| 72 65 61 6d 2e 68 3e 0a | 0a 69 6e 74 20 6d 61 69 |ream.h>.|.int mai|
|000004c0| 6e 28 29 0a 7b 0a 09 63 | 68 61 72 20 62 75 66 5b |n().{..c|har buf[|
|000004d0| 38 30 5d 3b 0a 0a 09 2f | 2f 72 65 61 64 20 61 20 |80];.../|/read a |
|000004e0| 6c 69 6e 65 20 66 72 6f | 6d 20 74 68 65 20 6b 65 |line fro|m the ke|
|000004f0| 79 62 6f 61 72 64 20 75 | 70 20 74 6f 20 74 68 65 |yboard u|p to the|
|00000500| 20 72 65 74 75 72 6e 0a | 09 63 69 6e 2e 67 65 74 | return.|.cin.get|
|00000510| 6c 69 6e 65 28 62 75 66 | 2c 20 38 30 29 3b 0a 09 |line(buf|, 80);..|
|00000520| 63 6f 75 74 20 3c 3c 20 | 22 79 6f 75 20 65 6e 74 |cout << |"you ent|
|00000530| 65 72 65 64 3a 22 20 3c | 3c 20 62 75 66 20 3c 3c |ered:" <|< buf <<|
|00000540| 20 22 5c 6e 22 3b 0a 0a | 09 2f 2f 72 65 61 64 20 | "\n";..|.//read |
|00000550| 61 20 6c 69 6e 65 20 66 | 72 6f 6d 20 74 68 65 20 |a line f|rom the |
|00000560| 6b 65 79 62 6f 61 72 64 | 20 75 70 20 74 6f 20 61 |keyboard| up to a|
|00000570| 20 74 61 62 0a 09 63 6f | 75 74 20 3c 3c 20 22 45 | tab..co|ut << "E|
|00000580| 6e 74 65 72 20 61 20 6c | 69 6e 65 20 77 69 74 68 |nter a l|ine with|
|00000590| 20 61 20 74 61 62 20 69 | 6e 20 69 74 3a 22 3b 0a | a tab i|n it:";.|
|000005a0| 09 63 69 6e 2e 67 65 74 | 6c 69 6e 65 28 62 75 66 |.cin.get|line(buf|
|000005b0| 2c 20 38 30 2c 20 27 5c | 74 27 29 3b 0a 09 63 6f |, 80, '\|t');..co|
|000005c0| 75 74 20 3c 3c 20 22 5c | 6e 59 6f 75 20 65 6e 74 |ut << "\|nYou ent|
|000005d0| 65 72 65 64 3a 22 20 3c | 3c 20 62 75 66 20 3c 3c |ered:" <|< buf <<|
|000005e0| 20 22 5c 6e 22 3b 0a 0a | 09 72 65 74 75 72 6e 20 | "\n";..|.return |
|000005f0| 30 3b 0a 7d 0a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |0;.}.---|--------|
|00000600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 41 6c 73 |--------|----.Als|
|00000610| 6f 20 6e 6f 74 65 20 79 | 6f 75 20 63 61 6e 20 75 |o note y|ou can u|
|00000620| 73 65 20 61 6e 79 20 69 | 73 74 72 65 61 6d 20 69 |se any i|stream i|
|00000630| 6e 20 70 6c 61 63 65 20 | 6f 66 20 63 69 6e 2c 20 |n place |of cin, |
|00000640| 73 6f 20 74 68 61 74 20 | 79 6f 75 20 63 61 6e 0a |so that |you can.|
|00000650| 72 65 61 64 20 65 6e 74 | 69 72 65 20 6c 69 6e 65 |read ent|ire line|
|00000660| 73 20 66 72 6f 6d 20 64 | 69 73 6b 20 66 69 6c 65 |s from d|isk file|
|00000670| 73 20 61 6e 64 20 6f 74 | 68 65 72 20 69 6e 70 75 |s and ot|her inpu|
|00000680| 74 20 73 74 72 65 61 6d | 73 2e 0a 0a 48 6f 70 65 |t stream|s...Hope|
|00000690| 20 74 68 69 73 20 68 65 | 6c 70 73 2e 0a 0a 46 72 | this he|lps...Fr|
|000006a0| 65 65 6c 79 20 79 6f 75 | 72 73 2c 0a 0a 42 65 6e |eely you|rs,..Ben|
|000006b0| 6a 61 6d 69 6e 20 52 6f | 6d 65 72 0a 53 6f 66 74 |jamin Ro|mer.Soft|
|000006c0| 77 61 72 65 20 45 6e 67 | 69 6e 65 65 72 0a 55 6e |ware Eng|ineer.Un|
|000006d0| 69 73 79 73 20 43 6f 72 | 70 2e 0a 0a 23 69 6e 63 |isys Cor|p...#inc|
|000006e0| 6c 75 64 65 20 3c 73 74 | 64 64 69 73 63 6c 61 69 |lude <st|ddisclai|
|000006f0| 6d 2e 68 3e 0a | |m.h>. | |
+--------+-------------------------+-------------------------+--------+--------+